<style>
    #reportDetail-edit .layui-form-label {
        width:126px;
    }
    #reportDetail-edit .layui-input-block {
        margin-left: 156px;
    }
    #reportDetail-edit .layui-panel {
        margin-top: 10px;
    }

</style>
<div class="layui-fluid" id="reportDetail-edit">
    <form class="layui-form" action="" lay-filter="reportDetail-edit-form">
        <div class="layui-card">
            <blockquote class="layui-elem-quote layui-elem-quote-primary">事故信息</blockquote>
            <div class="layui-card-body">
                <div class="layui-form-item febs-hide">
                    <label class="layui-form-label febs-form-item-require">：报告id</label>
                    <div class="layui-input-block">
                        <input type="text" name="reportId" th:value="${accidentReport.reportId}" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">事故标题：</label>
                            <div class="layui-input-block layui-input-block-html " th:text="${accidentReport.accidentTitle}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">

                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail ">事故类型：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentType">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">事故等级：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentLevel">
                            </div>
                        </div>

                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail ">发生时间：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentDate}">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail ">发生地点：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentPlace}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">船舶类型：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentShipType">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">是否接受援助：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.acceptAssistFlg == '1'?'是':'否'}">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">报告主管部门：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.noticeDeptFlg == '1'?'是':'否'}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item" th:if="${accidentReport.noticeDeptFlg == '1'}" id="noticeDeptDiv">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">主管部门名称：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.noticeDeptName}">
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">上报时间：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.noticeDeptDate}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">初步损失情况：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.preliminarilyDamage}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">初步描述：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.preliminarilyDescript}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <label class="layui-form-label layui-form-label-detail">上报附件：</label>
                        <div class="layui-input-block layui-input-block-html" id="uploadReportBtn">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <label class="layui-form-label layui-form-label-detail">调查人员：</label>
                        <div class="layui-input-block layui-input-block-html" id="surveyUser">
                            <table lay-filter="teamListTable" id="teamListTable" lay-data="{id: 'teamListTable'}"></table>
                        </div>
                    </div>
                </div>
            </div>
        </div>

<!--        (调查状态): 1:待调查指派 2：已分配待调查-->
        <div class="layui-card" th:if="${accidentReport.accidentElapse}">
            <blockquote class="layui-elem-quote layui-elem-quote-primary">调查结果</blockquote>
            <div class="layui-card-body">
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail ">事故经过描述：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentElapse}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">项目名称：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.projectName}" >
                            </div>
                        </div>
                        <div class="layui-col-xs6">
                            <label class="layui-form-label layui-form-label-detail">区域位置：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentAreaName}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">具体位置：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.detailPlace}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <label class="layui-form-label layui-form-label-detail">事故图解：</label>
                        <div class="layui-input-block layui-input-block-html" id="fileUploadReportImg">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">时间线：</label>
                            <div class="layui-input-block layui-input-block-html jhg-body-table">
                                <table lay-filter="timelineTable" id="timelineTable" lay-data="{id: 'timelineTable'}"></table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">应急反应级别：</label>
                            <div class="layui-input-block layui-input-block-html" name="emergencyLevel">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">事故性质：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentNature">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">违反保命规则：</label>
                            <div class="layui-input-block layui-input-block-html" name="violationSurvivalRules">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">应急处理情况：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.emergencyOverview}">
                            </div>
                        </div>
                    </div>
                </div>


                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">事故类别：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentCategory">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">事故类型：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentType">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">事故等级：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentLevel">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">事故概况：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentOverview}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">事故原因：</label>
                            <div class="layui-input-block layui-input-block-html" name="accidentLevel">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <label class="layui-form-label layui-form-label-detail">事故分析图：</label>
                        <div class="layui-input-block layui-input-block-html" id="fileUploadReportAnalysis">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">直接原因：</label>
                            <div class="layui-input-block layui-input-block-html" name="directReason">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">直接原因补充：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.directReasonRemark}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">间接原因：</label>
                            <div class="layui-input-block layui-input-block-html" name="indirectionReason">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">间接原因补充：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.indirectionReasonRemark}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">根本原因：</label>
                            <div class="layui-input-block layui-input-block-html" name="rootReason">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">根本原因补充：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.rootReasonRemark}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">直接经济损失：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.economyLoss}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">间接经济损失：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.indirectLoss}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">经济损失（总）：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.totalLoss}">
                            </div>
                        </div>
                    </div>
                </div>


                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">损失工时（总）：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.totalLossHours}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">环境影响：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.environmentEffect}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">分析及处理建议：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.accidentAnalysis}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任人姓名：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationRealName}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任比例(%)：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationRatio}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" th:if="${accidentReport.obligationUserId!=null}">
                    <div class="layui-row">
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任部门：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationDeptName}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任人岗位：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationPostName}">
                            </div>
                        </div>
                        <div class="layui-col-xs4">
                            <label class="layui-form-label layui-form-label-detail">责任人工号：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationUserNo}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">责任认定：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationCognizance}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">责任人追究：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.obligationDisposeCondition}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">肇事人员：</label>
                            <div class="layui-input-block layui-input-block-html jhg-body-table">
                                    <table lay-filter="culpritUserTable" id="culpritUserTable" lay-data="{id: 'culpritUserTable'}"></table>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-row">
                        <div class="layui-col-xs12">
                            <label class="layui-form-label layui-form-label-detail">伤亡人员：</label>
                            <div class="layui-input-block layui-input-block-html jhg-body-table">
                                    <table lay-filter="injuryUserTable" id="injuryUserTable" lay-data="{id: 'injuryUserTable'}"></table>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item" th:if="${accidentReport.obligationUserId}">
                    <div class="layui-row">
                        <div class="layui-col-xs3">
                            <label class="layui-form-label layui-form-label-detail">死亡人数：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.deathToll}">
                            </div>
                        </div>
                        <div class="layui-col-xs3">
                            <label class="layui-form-label layui-form-label-detail">重伤人数：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.severeInjuryToll}">
                            </div>
                        </div>
                        <div class="layui-col-xs3">
                            <label class="layui-form-label layui-form-label-detail">轻伤人数：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.slightInjuryToll}">
                            </div>
                        </div>
                        <div class="layui-col-xs3">
                            <label class="layui-form-label layui-form-label-detail">失踪人数：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${accidentReport.missingToll}">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-col-xs12">
                        <label class="layui-form-label layui-form-label-detail">调查附件：</label>
                        <div class="layui-input-block layui-input-block-html" id="uploadReportSurveyBtn">
                        </div>
                    </div>
                </div>

            </div>
        </div>

        <div class="layui-card" th:if="${not #lists.isEmpty(accidentReport.rectificationOpinionList)}">
            <blockquote class="layui-elem-quote layui-elem-quote-primary">整改措施</blockquote>

            <div class="layui-card-body" id="reason_box">

            </div>

        </div>

        <div class="layui-form-item febs-hide">
            <button class="layui-btn" lay-submit="" lay-filter="reportDetail-edit-form-submit" id="submit"></button>
            <button type="reset" class="layui-btn" id="reset"></button>
        </div>
    </form>
</div>
<script data-th-inline="javascript">
    var accidentReportData = [[${accidentReport}]];
    var accidentReportReasonData = [[${accidentReportReason}]];
    var injuryLevelList = [[${injuryLevelList}]];
</script>
<script th:src="@{/febs/js/accidentReport/accidentReportDetail.js(v=1)}"></script>